package com.hualude.roadsign.dto;

import com.hualude.roadsign.model.NoticeEntity;
import com.hualude.roadsign.model.UserNoticeEntity;

/**
 * Created by pjn on 2017/3/3.
 */
public class NoticeListDto {
    private Integer noticeId;
    private Integer createUserId;
    private String createUserName;
    private String noticeTitle;
    private String noticeContent;
    private String noticeSendTime;
    private Integer userNoticeId;
    private Integer isRead;
    private String readTime;
    private Integer userId;
    private String noticePic;
    private Integer noticeType;

    public NoticeListDto() {
    }

    public NoticeListDto(Integer noticeId, Integer createUserId, String createUserName, String noticeTitle, String noticeContent, String noticeSendTime, Integer userNoticeId, Integer isRead, String readTime) {
        this.noticeId = noticeId;
        this.createUserId = createUserId;
        this.createUserName = createUserName;
        this.noticeTitle = noticeTitle;
        this.noticeContent = noticeContent;
        this.noticeSendTime = noticeSendTime;
        this.userNoticeId = userNoticeId;
        this.isRead = isRead;
        this.readTime = readTime;
    }

    public NoticeListDto(Integer noticeId, Integer createUserId, String createUserName, String noticeTitle, String noticeContent, String noticeSendTime) {
        this.noticeId = noticeId;
        this.createUserId = createUserId;
        this.createUserName = createUserName;
        this.noticeTitle = noticeTitle;
        this.noticeContent = noticeContent;
        this.noticeSendTime = noticeSendTime;
    }

    public NoticeListDto(Integer userNoticeId, Integer isRead, String readTime, Integer noticeId, String noticeTitle, String noticeContent, String noticeSendTime) {
        this.userNoticeId = userNoticeId;
        this.isRead = isRead;
        this.readTime = readTime;
        this.noticeId = noticeId;
        this.noticeTitle = noticeTitle;
        this.noticeContent = noticeContent;
        this.noticeSendTime = noticeSendTime;
    }

    public NoticeListDto(Integer noticeId, String noticeTitle, String noticeContent, String noticeSendTime, String noticePic) {
        this.noticeId = noticeId;
        this.noticeTitle = noticeTitle;
        this.noticeContent = noticeContent;
        this.noticeSendTime = noticeSendTime;
        this.noticePic = noticePic;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public Integer getNoticeId() {
        return noticeId;
    }

    public void setNoticeId(Integer noticeId) {
        this.noticeId = noticeId;
    }

    public String getNoticeTitle() {
        return noticeTitle;
    }

    public void setNoticeTitle(String noticeTitle) {
        this.noticeTitle = noticeTitle;
    }

    public String getNoticeContent() {
        return noticeContent;
    }

    public void setNoticeContent(String noticeContent) {
        this.noticeContent = noticeContent;
    }

    public String getNoticeSendTime() {
        return noticeSendTime;
    }

    public void setNoticeSendTime(String noticeSendTime) {
        this.noticeSendTime = noticeSendTime;
    }

    public Integer getUserNoticeId() {
        return userNoticeId;
    }

    public void setUserNoticeId(Integer userNoticeId) {
        this.userNoticeId = userNoticeId;
    }

    public Integer getIsRead() {
        return isRead;
    }

    public void setIsRead(Integer isRead) {
        this.isRead = isRead;
    }

    public String getReadTime() {
        return readTime;
    }

    public void setReadTime(String readTime) {
        this.readTime = readTime;
    }

    public String getNoticePic() {
        return noticePic;
    }

    public void setNoticePic(String noticePic) {
        this.noticePic = noticePic;
    }

    public Integer getNoticeType() {
        return noticeType;
    }

    public void setNoticeType(Integer noticeType) {
        this.noticeType = noticeType;
    }

    public NoticeEntity toBean() {
        NoticeEntity noticeBean = new NoticeEntity();
        noticeBean.setNoticeId(noticeId);
        noticeBean.setCreateUserId(createUserId);
        noticeBean.setNoticeTitle(noticeTitle);
        noticeBean.setNoticeContent(noticeContent);
        noticeBean.setNoticeSendTime(noticeSendTime);
        noticeBean.setNoticeType(noticeType);
        return noticeBean;
    }

    public NoticeEntity toAppBean() {
        NoticeEntity noticeBean = new NoticeEntity();
        noticeBean.setNoticeId(noticeId);
        noticeBean.setCreateUserId(createUserId);
        noticeBean.setNoticeTitle(noticeTitle);
        noticeBean.setNoticeContent(noticeContent);
        noticeBean.setNoticeSendTime(noticeSendTime);
        noticeBean.setNoticePic(noticePic);
        noticeBean.setNoticeType(noticeType);
        return noticeBean;
    }

    public UserNoticeEntity toUserNoticeBean() {
        UserNoticeEntity userNoticeBean = new UserNoticeEntity();
        userNoticeBean.setIsRead(0);
        userNoticeBean.setReadTime("");
        userNoticeBean.setNoticeId(noticeId);
        userNoticeBean.setUserId(userId);
        return userNoticeBean;
    }

    @Override
    public String toString() {
        return "NoticeListDto{" +
                "noticeId=" + noticeId +
                ", createUserId=" + createUserId +
                ", createUserName='" + createUserName + '\'' +
                ", noticeTitle='" + noticeTitle + '\'' +
                ", noticeContent='" + noticeContent + '\'' +
                ", noticeSendTime='" + noticeSendTime + '\'' +
                ", userNoticeId=" + userNoticeId +
                ", isRead=" + isRead +
                ", readTime='" + readTime + '\'' +
                ", userId=" + userId +
                ", noticePic='" + noticePic + '\'' +
                ", noticeType=" + noticeType +
                '}';
    }
}
